
var jwx_now_num

function start(num,now){
	var jwx_a1=document.getElementById("jwx_a1");
	var jwx_a2=document.getElementById("jwx_a2");
	var jwx_a3=document.getElementById("jwx_a3");
	var jwx_a4=document.getElementById("jwx_a4");
	var jwx_a5=document.getElementById("jwx_a5");

	jwx_now_num=now;


	if (now==1) {
			jwx_a1.setAttribute("class", "centerpage_out");
			jwx_a2.setAttribute("class", "centerpage_out");
			jwx_a3.setAttribute("class", "centerpage_in");
			jwx_a4.setAttribute("class", "centerpage");
			jwx_a5.setAttribute("class", "centerpage");

			jwx_a1.innerHTML=""
			jwx_a2.innerHTML=""
			jwx_a3.innerHTML=1
			if (num>1) {
				jwx_a4.innerHTML=2
			}else{
				jwx_a4.setAttribute("class", "centerpage_out");
			}
			if (num>2) {
				jwx_a5.innerHTML=3
			}else{
				jwx_a5.setAttribute("class", "centerpage_out");
			}
			
			
	}else if (now==2) {
			jwx_a1.setAttribute("class", "centerpage_out");
			jwx_a2.setAttribute("class", "centerpage");
			jwx_a3.setAttribute("class", "centerpage_in");
			jwx_a4.setAttribute("class", "centerpage");
			jwx_a5.setAttribute("class", "centerpage");

			jwx_a1.innerHTML=""
			jwx_a2.innerHTML=1
			jwx_a3.innerHTML=2
			if (num>2) {
				jwx_a4.innerHTML=3
			}else{
				jwx_a4.setAttribute("class", "centerpage_out");
			}
			if (num>3) {
				jwx_a5.innerHTML=4
			}else{
				jwx_a5.setAttribute("class", "centerpage_out");
			}
			

	}else{
			jwx_a1.setAttribute("class", "centerpage");
			jwx_a2.setAttribute("class", "centerpage");
			jwx_a3.setAttribute("class", "centerpage_in");
			jwx_a4.setAttribute("class", "centerpage");
			jwx_a5.setAttribute("class", "centerpage");

			jwx_a1.innerHTML=now-2
			jwx_a2.innerHTML=now-1
			jwx_a3.innerHTML=now
			if (num>now) {
				jwx_a4.innerHTML=now+1
			}else{
				jwx_a4.setAttribute("class", "centerpage_out");
			}
			if (num>now+1) {
				jwx_a5.innerHTML=now+2
			}else{
				jwx_a5.setAttribute("class", "centerpage_out");
			}
			
	}
}

function jwx_left(num,now){
	var jwx_a1=document.getElementById("jwx_a1");
	var jwx_a2=document.getElementById("jwx_a2");
	var jwx_a3=document.getElementById("jwx_a3");
	var jwx_a4=document.getElementById("jwx_a4");
	var jwx_a5=document.getElementById("jwx_a5");
	if (jwx_now_num-1>0){
		if (jwx_now_num-4<0){
			jwx_a5.setAttribute("class", jwx_a4.className);
			jwx_a5.innerHTML=jwx_a4.innerHTML;
			jwx_a4.setAttribute("class", jwx_a3.className);
			jwx_a4.innerHTML=jwx_a3.innerHTML;
			jwx_a3.setAttribute("class", jwx_a2.className);
			jwx_a3.innerHTML=jwx_a2.innerHTML;
			jwx_a2.setAttribute("class", jwx_a1.className);
			jwx_a2.innerHTML=jwx_a1.innerHTML;

			jwx_a1.setAttribute("class", "centerpage_out");
			jwx_a1.innerHTML="";
		}else if (jwx_now_num-3==now) {
			jwx_a5.setAttribute("class", jwx_a4.className);
			jwx_a5.innerHTML=jwx_a4.innerHTML;
			jwx_a4.setAttribute("class", jwx_a3.className);
			jwx_a4.innerHTML=jwx_a3.innerHTML;
			jwx_a3.setAttribute("class", jwx_a2.className);
			jwx_a3.innerHTML=jwx_a2.innerHTML;
			jwx_a2.setAttribute("class", jwx_a1.className);
			jwx_a2.innerHTML=jwx_a1.innerHTML;

			jwx_a1.setAttribute("class", "centerpage_in");
			jwx_a1.innerHTML=jwx_now_num-3;
		}else{
			jwx_a5.setAttribute("class", jwx_a4.className);
			jwx_a5.innerHTML=jwx_a4.innerHTML;
			jwx_a4.setAttribute("class", jwx_a3.className);
			jwx_a4.innerHTML=jwx_a3.innerHTML;
			jwx_a3.setAttribute("class", jwx_a2.className);
			jwx_a3.innerHTML=jwx_a2.innerHTML;
			jwx_a2.setAttribute("class", jwx_a1.className);
			jwx_a2.innerHTML=jwx_a1.innerHTML;

			jwx_a1.setAttribute("class", "centerpage");
			jwx_a1.innerHTML=jwx_now_num-3;
		}
		jwx_now_num--;
	}
}

function jwx_right(num,now){
	var jwx_a1=document.getElementById("jwx_a1");
	var jwx_a2=document.getElementById("jwx_a2");
	var jwx_a3=document.getElementById("jwx_a3");
	var jwx_a4=document.getElementById("jwx_a4");
	var jwx_a5=document.getElementById("jwx_a5");
	if (jwx_now_num<num){
		if (jwx_now_num+3>num){
			jwx_a1.setAttribute("class", jwx_a2.className);
			jwx_a1.innerHTML=jwx_a2.innerHTML;
			jwx_a2.setAttribute("class", jwx_a3.className);
			jwx_a2.innerHTML=jwx_a3.innerHTML;
			jwx_a3.setAttribute("class", jwx_a4.className);
			jwx_a3.innerHTML=jwx_a4.innerHTML;
			jwx_a4.setAttribute("class", jwx_a5.className);
			jwx_a4.innerHTML=jwx_a5.innerHTML;

			jwx_a5.setAttribute("class", "centerpage_out");
			jwx_a5.innerHTML="";
		}else if (jwx_now_num+3==now) {
			jwx_a1.setAttribute("class", jwx_a2.className);
			jwx_a1.innerHTML=jwx_a2.innerHTML;
			jwx_a2.setAttribute("class", jwx_a3.className);
			jwx_a2.innerHTML=jwx_a3.innerHTML;
			jwx_a3.setAttribute("class", jwx_a4.className);
			jwx_a3.innerHTML=jwx_a4.innerHTML;
			jwx_a4.setAttribute("class", jwx_a5.className);
			jwx_a4.innerHTML=jwx_a5.innerHTML;

			jwx_a5.setAttribute("class", "centerpage_in");
			jwx_a5.innerHTML=jwx_now_num+3;
		}else{
			jwx_a1.setAttribute("class", jwx_a2.className);
			jwx_a1.innerHTML=jwx_a2.innerHTML;
			jwx_a2.setAttribute("class", jwx_a3.className);
			jwx_a2.innerHTML=jwx_a3.innerHTML;
			jwx_a3.setAttribute("class", jwx_a4.className);
			jwx_a3.innerHTML=jwx_a4.innerHTML;
			jwx_a4.setAttribute("class", jwx_a5.className);
			jwx_a4.innerHTML=jwx_a5.innerHTML;

			jwx_a5.setAttribute("class", "centerpage");
			jwx_a5.innerHTML=jwx_now_num+3;
		}
		jwx_now_num++;
	}
}
function showImg() {
	document.getElementById("wxImg").style.display = 'block';
}

function hideImg() {
	document.getElementById("wxImg").style.display = 'none';
}
function replaceAt() {
    document.getElementById('nonofooter').innerHTML = document.getElementById('nonofooter').innerHTML.replace("{A!-!T}", "@")
}
function check(){
	var pageNum = document.getElementById('pagesInformation').value;
	if(pageNum==null||pageNum.trim()==""){
		alert("请输入页码");
		return false;
	}else{
		var total = document.getElementById('total').value;
        var pageNum = document.getElementById('pagesInformation').value;
        if (pageNum<=total){
        	return true;
		}else{
            alert("请输入正确的页码");
            return false;
		}
	}
}